package Chpter4;

interface Animal9{
	void shout();
}
class Cat9 implements Animal9{
	public void shout() {
		System.out.println("miao");
	}
}
class Dog9 implements Animal9{
	public void shout() {
		System.out.println("wang");
	}
}
public class Example13 {
	public static void main(String[] args) {
		Animal9 an1=new Cat9();
		Animal9 an2=new Dog9();
		animalShout(an1);
		animalShout(an2);
	}
	public static void animalShout(Animal9 an) {
		an.shout();
	}

}
